package team.seekers.hula.course.course.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import team.seekers.hula.common.entity.BaseDTO;

import javax.validation.constraints.NotBlank;
import java.util.Date;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class CourseUpdateDTO extends BaseDTO {

    private String id;

    @Length(max = 60, message = "标题最大长度为 60")
    @NotBlank
    private String name;

    private String nickname;

    private String cover;

    private String description;

    private String introduction;

    private Double price;

    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date gmtCreate;
}
